/**
 * Created by Dalyn on 2017/4/01.
 */
import Relay from "react-relay";

export default class getReplyListMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { getReplyList }`;
    }

    getVariables() { 
        return {
            argsInput: {
              suggestId: this.props.suggestId,
              label: this.props.label
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on getReplyListPayload {
            getReplyList {
              value
              errorCode
              totalResult
              replyModelList{
                url3
                phone
                url2
                detail
                label
                headUrl
                suggestId
                createDate
                isShow
                rid
                userName
              }
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
              fragment on getReplyListPayload {
                    getReplyList {
                      value
                      errorCode
                      totalResult
                      replyModelList{
                        url3
                        phone
                        url2
                        detail
                        label
                        headUrl
                        suggestId
                        createDate
                        isShow
                        rid
                        userName
                      }
                      }
                  }
            `]
        }];
    }

}
